import Vue from "vue";
import Vuex from "vuex";
import createPersistedState from "vuex-persistedstate";
import app from "./modules/app";
import userInfo from "./modules/userInfo";
import menuList from "./modules/menuList";
import getters from "./getters";
Vue.use(Vuex);

const store = new Vuex.Store({
  getters,
  modules: {
    app,
    userInfo,
    menuList
  },
  plugins: [
    createPersistedState({
      storage: window.localStorage
    })
  ]
});

export default store;
